using Cysharp.Threading.Tasks;

namespace IQIGame.Onigao.Framework
{
    public interface IPoolObjectOperationHelper<T> where T : IPoolObject
    {
        /// <summary>
        /// 创建对象，池中无备用对象时调用
        /// </summary>
        /// <param name="assetName"></param>
        /// <returns></returns>
        T Create(string assetName);

        /// <summary>
        /// 销毁对象，释放对象时池满，或销毁池时调用
        /// </summary>
        void DestroyObject(T obj);

        /// <summary>
        /// 销毁Factory
        /// </summary>
        void Dispose();
    }
}
